TResult
The shape of the result.
Cocktail Help Reference
Pager<TResult>(Func<IQueryable<T>,IQueryable<TResult>>,Int32,ISortSelector,Expression<Func<T,Boolean>>,Action<IFetchOptions<TResult>>) Method
See Also  Send Feedback
Cocktail Assembly > Cocktail Namespace > PagerRepository<T> Class > Pager Method : Pager<TResult>(Func<IQueryable<T>,IQueryable<TResult>>,Int32,ISortSelector,Expression<Func<T,Boolean>>,Action<IFetchOptions<TResult>>) Method



selector
The selector used to shape the entities.
pageSize
The desired page size.
sortSelector
Required sorting criteria.
predicate
Optional predicate to filter the paged entities.
fetchOptions
Optional delegate to specify additional fetching options.

Glossary Item Box

Returns a pager which allows shaped entities to be paged.

Syntax

Visual Basic (Declaration) 
Public Overloads Function Pager(Of TResult)( _
   ByVal selector As Func(Of IQueryable(Of T),IQueryable(Of TResult)), _
   ByVal pageSize As Integer, _
   ByVal sortSelector As IdeaBlade.Core.ISortSelector, _
   Optional ByVal predicate As Expression(Of Func(Of T,Boolean)), _
   Optional ByVal fetchOptions As Action(Of IFetchOptions(Of TResult)) _
) As IPager(Of TResult)
Visual Basic (Usage)Copy Code
Dim instance As PagerRepository(Of T)
Dim selector As Func(Of IQueryable(Of T),IQueryable(Of TResult))
Dim pageSize As Integer
Dim sortSelector As IdeaBlade.Core.ISortSelector
Dim predicate As Expression(Of Func(Of T,Boolean))
Dim fetchOptions As Action(Of IFetchOptions(Of TResult))
Dim value As IPager(Of TResult)
 
value = instance.Pager(Of TResult)(selector, pageSize, sortSelector, predicate, fetchOptions)

Parameters

selector
The selector used to shape the entities.
pageSize
The desired page size.
sortSelector
Required sorting criteria.
predicate
Optional predicate to filter the paged entities.
fetchOptions
Optional delegate to specify additional fetching options.

Type Parameters

TResult
The shape of the result.

Return Value

IPager<T> which allows the shaped entities to be paged.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.